﻿Imports PostSharp.Aspects

Namespace Diagnostics.Profiler
    <Serializable(), OnProfilingAttribute(AttributeExclude:=True)> _
    Public Class OnProfilingAttribute
        Inherits OnMethodBoundaryAspect

        Public Overrides Sub OnEntry(ByVal args As MethodExecutionArgs)
            Profiler.ProfilerManager.EntryMethod(args.Method)
        End Sub

        Public Overrides Sub OnExit(ByVal args As MethodExecutionArgs)
            Profiler.ProfilerManager.ExitMethod(args.Method)
        End Sub
    End Class
End Namespace
